<?php
class FixtureForm extends CFormModel
{
	public $decadas;
	public $decada;
	public $torneos;
	public $fases;
	public $fechas;
	public $partidos;
	public $id_campeonato;
	public $id_fase;
	public $tipoFase;
	public $numFecha;
	public $partidosProvider;
	public $fase;
	public $posiciones;
	public $posicionesProvider;
	
	public function __construct()
	{
		$this->decadas = array();
		$decada30 = new Decada();
		$decada30->id="1";
		$decada30->nombre="1931 a 1939";
		$decada30->imagen="";
		array_push($this->decadas, $decada30);
		$decada40 = new Decada();
		$decada40->id="2";
		$decada40->nombre="1940 a 1949";
		$decada40->imagen="";
		array_push($this->decadas, $decada40);
		$decada50 = new Decada();
		$decada50->id="3";
		$decada50->nombre="1950 a 1959";
		$decada50->imagen="";
		array_push($this->decadas, $decada50);
		$decada60 = new Decada();
		$decada60->id="4";
		$decada60->nombre="1960 a 1969";
		$decada60->imagen="";
		array_push($this->decadas, $decada60);
		$decada70 = new Decada();
		$decada70->id="5";
		$decada70->nombre="1970 a 1979";
		$decada70->imagen="";
		array_push($this->decadas, $decada70);
		$decada80 = new Decada();
		$decada80->id="6";
		$decada80->nombre="1980 a 1989";
		$decada80->imagen="";
		array_push($this->decadas, $decada80);
		$decada90 = new Decada();
		$decada90->id="7";
		$decada90->nombre="1990 a 1999";
		$decada90->imagen="";
		array_push($this->decadas, $decada90);
		$decada00 = new Decada();
		$decada00->id="8";
		$decada00->nombre="2000 a 2009";
		$decada00->imagen="";
		array_push($this->decadas, $decada00);
		$decada10 = new Decada();
		$decada10->id="9";
		$decada10->nombre="2010 a 2013";
		$decada10->imagen="";
		array_push($this->decadas, $decada10);
	}
	
	public function getDecadaById($id){
		$d;
		foreach ($this->decadas as $decada){
			if ($id == $decada->id){
				$d = $decada;
			}
		}
		return $d;
	}
}